package com.turing.data.model.domain.excel;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.turing.orm.model.domain.common.BaseDo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @Description 导出基础表，记录各个场景的导出类型
 * @Author lcy
 * @Date 2021-08-09
 */
@ApiModel(value = "导出基础表，记录各个场景的导出类型")
@Data
@EqualsAndHashCode(callSuper = false)
@Builder(toBuilder = true)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class ExportInfo extends BaseDo<ExportInfo> {

    @ApiModelProperty(value = "主键id")
    @TableId(value = "parentTaskSn", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "场景id")
    @TableField("template_id")
    private String templateId;

    @ApiModelProperty(value = "0-根据要素字段导出，1-根据场景id再匹配数据库")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "标题，如果分组需要多个标题通过,分开")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "导出文件名--默认是场景名称,主要是针对多条场景导出，如果是分组需要通过,分开")
    @TableField("file_name")
    private String fileName;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}

